package cn.tkxqc.aoptest.controller;


import cn.tkxqc.aoptest.pojo.User;
import com.sun.xml.internal.ws.encoding.ContentType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.awt.*;
import java.util.regex.MatchResult;

@Controller
public class IndexController {

    @RequestMapping(value = "/index")
    @ResponseBody
    public User getUser(@RequestParam("id") String id){
        return new User(id,"张三",25);
    }

    @RequestMapping(value = "/one")
    @ResponseBody
    public User getOne(@RequestParam("id") String id,@RequestParam("name") String name){
        return new User(id,name,25);
    }
}
